﻿<Window x:Class="Snip.ProgressDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Snip, Snip, Snip..." SizeToContent="WidthAndHeight"
        ResizeMode="NoResize" WindowStartupLocation="CenterOwner" UseLayoutRounding="True" TextOptions.TextFormattingMode="Display">

    <Window.TaskbarItemInfo>
        <TaskbarItemInfo />
    </Window.TaskbarItemInfo>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Margin="15,15,15,15" Width="305">
            <Grid.RowDefinitions>
                <RowDefinition />
                <RowDefinition />
            </Grid.RowDefinitions>

            <TextBlock TextAlignment="Right" Margin="0,0,6,0">
                <TextBlock x:Name="ProgressSizeTextBlock" /> <TextBlock Text="/" /> <TextBlock x:Name="FileSizeTextBlock" />
            </TextBlock>
            <ProgressBar Grid.Row="1" Minimum="0" Maximum="100" Width="300" Height="15" Name="ProgressBar" HorizontalAlignment="Stretch" VerticalAlignment="Center" />
            <TextBlock x:Name="PercentTextBlock" Grid.Row="1" TextAlignment="Center" FontSize="10" VerticalAlignment="Center" Text="{Binding Path=Value, StringFormat='\{0\}%', ElementName=ProgressBar}" />
        </Grid>

        <Border Grid.Row="1" Grid.ColumnSpan="2" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" BorderThickness="0,1,0,0" BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}" Padding="15,7">
            <Button x:Name="CancelButton" Grid.Row="0" Grid.Column="1" Content="Cancel" IsCancel="True" Width="75" Height="23" HorizontalAlignment="Right" VerticalAlignment="Center" Click="CancelButton_Click" />
        </Border>
    </Grid>
</Window>
